package com.example.payserver1040.feignclient;

import com.example.springcloudusercommon.entity.User;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: 温伟雄
 * @Date: 2021/10/13/9:28
 * @Description:
 */
@Component
public class UserFeignClientFallback implements UserFeignClient{
    //日志打印器
    private Logger log= LoggerFactory.getLogger(UserFeignClientFallback.class);


    @Override
    public User getById(Long id) {
        log.info("用户服务不可用");
        return new User(-1l,"无此用户","用户服务不可用");
    }
}
